<style scoped lang="scss">
.box {
  width: 100%;
  text-align: center;
  h2{
    color: #427dfd;
  }
  p{
    margin-top: 20px;
    font-size: 14px;
    color:#666;
  }
  h3{
    margin-top: 30px;
    color:red;
  }
  button{
    margin-top: 400px;
    width: 90%;
    border-radius: 20px;
    height: 40px;
    background-color: #427dfd;
    border: none;
    color: #fff
  }
}
</style>
<template>
  <div class="box">
    <h2>订单结算</h2>
    <p>单号：{{ arr.id }}</p >
    <h3>总价¥：{{ arr.prices }}.00</h3>
    <van-button @click="zfs" type="primary">确定付款</van-button>
  </div>
</template>
<script setup lang="ts">
// 接收数据
import { useRoute } from 'vue-router'
import { ref } from 'vue'
import { get_zf } from '@/api'
const arr:any = ref({})
const router = useRoute()
const obj = router.query.obj
arr.value = JSON.parse(obj as any)
const zfs = async () => {
  const res = await get_zf(arr.value)
  console.log(res)
  window.open(res.data.result)
}
</script>